home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4549 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: thor.tu.hac.com!collins
  2. From: collins@thor.tu.hac.com (Ron Collins)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Newbie Q: Arrays > 64K?
  5. Date: 5 Feb 1996 19:09:40 GMT
  6. Organization: Advanced Depot Systems
  7. Message-ID: <4f5klk$nru@hacgate2.hac.com>
  8. References: <4f3ajc$oud@earth.superlink.net>
  9. NNTP-Posting-Host: thor.tu.hac.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. rizzom@superlink.net wrote:
  13. : Hi,
  14.  
  15. :   I am using Turbo C++ 3.0 in DOS.  I would just like to know 
  16. : how to declare an array that is larger than 64K.  I have tried 
  17. : all of the memory models available and still get an error 
  18. : saying Array too large.  Here is the code:
  19. [snip]
  20.  
  21. You can't.  In DOS, each data segment is limited to 64K in size; since your
  22. compiler will not split an array across data segments, that means that the
  23. maximum size for any array is also limited to 64K.
  24.  
  25. You can get around this by switching to Windows (if you like banging your
  26. head into a wall), buying a DOS extender (expensive and clumsy to use),
  27. or switching to a _real_ OS (such as Linux) that doesn't have these
  28. limitations.
  29.  
  30. Or, of course, you can just re-code your application to use smaller arrays.
  31.  
  32.  
  33.                 -- collins --
  34.  
  35.